<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Subtarefa Details</f:facet>

        <s:decorate id="subtarefaid" template="layout/display.xhtml">
            <ui:define name="label">Subtarefaid</ui:define>
            <h:outputText value="#{subtarefaHome.instance.id.subtarefaid}"/>
        </s:decorate>
        <s:decorate id="tarefaid" template="layout/display.xhtml">
            <ui:define name="label">Tarefaid</ui:define>
            <h:outputText value="#{subtarefaHome.instance.id.tarefaid}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/SubtarefaEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty subtarefaFrom ? 'SubtarefaList' : subtarefaFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Tarefa by tarefaid</h:panelGroup>
        </f:facet>
    <div class="association" id="tarefaByTarefaidParent">

        <h:outputText value="There is no tarefaByTarefaid associated with this subtarefa."
                   rendered="#{subtarefaHome.instance.tarefaByTarefaid == null}"/>

        <rich:dataTable var="_tarefa"
                   value="#{subtarefaHome.instance.tarefaByTarefaid}"
                rendered="#{subtarefaHome.instance.tarefaByTarefaid != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="tarefaByTarefaidTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_tarefa.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Projeto id</f:facet>
                <h:outputText value="#{_tarefa.projeto.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Fim</f:facet>
                <h:outputText value="#{_tarefa.fim}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Inicio</f:facet>
                <h:outputText value="#{_tarefa.inicio}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Milestone</f:facet>
                <h:outputText value="#{_tarefa.milestone}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Nome</f:facet>
                <h:outputText value="#{_tarefa.nome}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Porcentcomp</f:facet>
                <h:outputText value="#{_tarefa.porcentcomp}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewtarefa"
                     value="View"
                      view="/Tarefa.xhtml">
                    <f:param name="tarefaId"
                           value="#{_tarefa.id}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Tarefa by subtarefaid</h:panelGroup>
        </f:facet>
    <div class="association" id="tarefaBySubtarefaidParent">

        <h:outputText value="There is no tarefaBySubtarefaid associated with this subtarefa."
                   rendered="#{subtarefaHome.instance.tarefaBySubtarefaid == null}"/>

        <rich:dataTable var="_tarefa"
                   value="#{subtarefaHome.instance.tarefaBySubtarefaid}"
                rendered="#{subtarefaHome.instance.tarefaBySubtarefaid != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="tarefaBySubtarefaidTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_tarefa.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Projeto id</f:facet>
                <h:outputText value="#{_tarefa.projeto.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Fim</f:facet>
                <h:outputText value="#{_tarefa.fim}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Inicio</f:facet>
                <h:outputText value="#{_tarefa.inicio}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Milestone</f:facet>
                <h:outputText value="#{_tarefa.milestone}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Nome</f:facet>
                <h:outputText value="#{_tarefa.nome}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Porcentcomp</f:facet>
                <h:outputText value="#{_tarefa.porcentcomp}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewtarefa"
                     value="View"
                      view="/Tarefa.xhtml">
                    <f:param name="tarefaId"
                           value="#{_tarefa.id}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
